/*! \file COMIniter.inl
 *	\brief 
 *
 *	created:	2009/11/16
 *	created:	16:11:2009   12:39
 *	filename: 	o:\main\libs\utils\COMIniter.inl
 *	file path:	o:\main\libs\utils
 *	file base:	COMIniter
 *	file ext:	inl
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */
namespace tt{
namespace utils{

COMIniter::COMIniter(DWORD params /*= 0*/)
: m_inited(false)
{
	HRESULT hr = CoInitializeEx(NULL, params);
	m_inited = SUCCEEDED(hr);
}

COMIniter::~COMIniter()
{
	if(m_inited)
		CoUninitialize();
}

bool COMIniter::inited() const
{
	return m_inited;
}

} //namespace utils
} //namespace tt
